package models;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;

import play.db.ebean.Model;
import play.db.ebean.Model.Finder;

@Entity
public class edu_tagscourses extends Model {

	@Id
	public int relation_id;
	
	public int tag_id;
	
	public int course_id;
	
	public int added_by_user_id;	
	
	public int vote;	
	
	public static Finder<Long,edu_tagscourses> find = new Finder<Long,edu_tagscourses>(Long.class, edu_tagscourses.class);
	
	public static List<edu_tagscourses> findByCourseId(int course_id) {
        return edu_tagscourses.find.where().eq("course_id", course_id).findList();
    }		
			
}
